/**
 * @Author YuanYuan
 * @Date 2022/5/6
 * @Time 19:31
 */
public class TestDemo {
    public static String myToString(int[] arr) {
        String ret ="[";
        for (int i = 0; i < arr.length; i++) {
            ret += arr[i];
            if(i!= arr.length-1){
                ret+=",";
            }

        }
        ret+="]";
        return ret;
    }
    public static void main(String[] args) {
        int[] arr = {1,2,3,4,5};
        System.out.println(myToString(arr));
    }
}
